package com.smi.swing;

import java.awt.FlowLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class SimpleFrame extends JFrame{

	public SimpleFrame() {
		super();
		build();
	}
	private void build(){
		setTitle("Premier Fenetre");
		setSize(300,400);
		setLocationRelativeTo(null);
		setVisible(true);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setContentPane(buildContentPane());
	}
	private JPanel buildContentPane(){
		JPanel p=new JPanel();
		p.setLayout(new FlowLayout(FlowLayout.LEFT));
		JLabel b=new JLabel("premier Texte");
		JLabel b1=new JLabel("text");
		p.add(b);
		p.add(b1);
		return p;
	}

	

}
